package com.jf.cloud.product.bo.mongo;

import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 对应MongoDB存储出入库商品emp
 * @author zz
 */
@Document("stock_bill_log_item")
@CompoundIndexes({
        @CompoundIndex(name = "id_idx", def = "{'stockBillLogItemId':1}", unique = true)
})
public class MongoStockBillLogItemBO {

    @Id
    @Schema(description = "出入库商品项id" )
    private Long stockBillLogItemId;

    @Schema(description = "创建时间" )
    private Date createTime;

    @Schema(description = "更新时间" )
    private Date updateTime;

    @Schema(description = "出入库明细id" )
    private Long stockBillLogId;

    @Schema(description = "实际出入库数量" )
    private Integer stockCount;

    @Schema(description = "商品库存剩余量" )
    private Integer afterStock;

    @Schema(description = "成本单价" )
    private Long unitPrice;

    @Schema(description = "商品id" )
    private Long spuId;

    @Schema(description = "skuId" )
    private Long skuId;

    @Schema(description = "备注" )
    private String remark;

    public Long getStockBillLogItemId() {
        return stockBillLogItemId;
    }

    public void setStockBillLogItemId(Long stockBillLogItemId) {
        this.stockBillLogItemId = stockBillLogItemId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getStockBillLogId() {
        return stockBillLogId;
    }

    public void setStockBillLogId(Long stockBillLogId) {
        this.stockBillLogId = stockBillLogId;
    }

    public Integer getStockCount() {
        return stockCount;
    }

    public void setStockCount(Integer stockCount) {
        this.stockCount = stockCount;
    }

    public Integer getAfterStock() {
        return afterStock;
    }

    public void setAfterStock(Integer afterStock) {
        this.afterStock = afterStock;
    }

    public Long getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Long unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "MongoStockBillLogItemBO{" +
                "stockBillLogItemId=" + stockBillLogItemId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", stockBillLogId=" + stockBillLogId +
                ", stockCount=" + stockCount +
                ", afterStock=" + afterStock +
                ", unitPrice=" + unitPrice +
                ", spuId=" + spuId +
                ", skuId=" + skuId +
                ", remark='" + remark + '\'' +
                '}';
    }
}
